﻿Option Strict On
Option Explicit On
Option Infer On

Imports System

Public Class MorphMetadata
   Public Shared Function MorphForSP(ByVal dbMetadataFilePath As String, ByVal ormFilePath As String) As IO.Stream
      Return GenDotNet.MorphMetadata.Utility.Morph( _
         KadGen.Utility2005.MorphSections.Build Or Utility2005.MorphSections.OrmMap, _
         "Ignore", _
         "Primary", _
         "Ignore", _
         dbMetadataFilePath, _
         ormFilePath, _
         False, _
         CodeGenerationSupport.UnbackedColumnBehavior.RetrieveAndSetSelect)
   End Function

   Public Shared Function MorphForObjects(ByVal dbMetadataFilePath As String, ByVal ormFilePath As String) As IO.Stream
      Return GenDotNet.MorphMetadata.Utility.Morph( _
         Utility2005.MorphSections.OrmMap Or Utility2005.MorphSections.Assembly, _
         "Primary", _
         "Secondary", _
         "Ignore", _
         dbMetadataFilePath, _
         ormFilePath, _
         False, _
         CodeGenerationSupport.UnbackedColumnBehavior.RetrieveAndSetSelectAndAssembly)
   End Function
End Class

      'DataStructureFileName: "Metadata\Security\DBMetadata.xml"
      ' mDataStructureFileName: "Metadata\Security\DBMetadata.xml"
      ' mOrmMapFileName: "SecurityORMFile.xml"
      ' mSections: 3
      ' mSPOrder: Ignore {4}
      ' mTableOrder: Primary {1}
      ' mUnbackedColumnBehavior: RetrieveAndSetSelectAndAssembly {5}
      ' museSchemaInWhereClause: False
      ' mViewOrder: Secondary {2}
      ' OrmMapFileName: "SecurityORMFile.xml"
      ' Sections: 3
      ' SPOrder: Ignore {4}
      ' TableOrder: Primary {1}
      ' UnbackedColumnBehavior: RetrieveAndSetSelectAndAssembly {5}
      ' UseSchemaInWhereClause: False
      ' ViewOrder: Secondary {2}
